package com.one.common.common.user.preserter;

import android.content.Context;

import com.one.common.model.http.callback.ObserverOnResultListener;
import com.one.common.presenter.BaseApiPresenter;
import com.one.common.view.base.BaseActivity;
import com.one.common.view.base.IView;
import com.one.common.common.user.modle.UserInfoModel;

/**
 * author ：zhulunjun
 * email  ：zhulunjun@qq.com
 * date   ：2018/8/11 下午6:16
 * description ：
 **/
public class FeedbackPresenter extends BaseApiPresenter<IView, UserInfoModel> {
    public FeedbackPresenter(IView mView, Context mContext) {
        super(mView, mContext, new UserInfoModel((BaseActivity) mContext));
    }

    public void feedback(String feedback) {
        mModel.feedback(feedback, new ObserverOnResultListener<String>() {
            @Override
            public void onResult(String s) {
                if (mView != null) {
                    mView.finishPage();
                }
            }
        });
    }

}
